<template>
    <h3>数组变化侦听</h3>

    <button @click="add">添加数据</button>
    <ul>
        <li v-for="(item, index) in list" :key="index">{{ item }}</li>
    </ul>
</template>


<script>

export default {
    data() {
        return {
            list: [1, 2, 3]
        }
    },
    methods: {
        add() {
            //this.list.push("4")

            console.log(this.list.concat("4"))
        }
    }
}
</script>